package com.tnsw.facebookautoliker;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ConnectionProblemActivity extends Activity implements OnClickListener {

	private Button btnRetry;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_connection_problem);
		
		this.btnRetry = (Button) this.findViewById(R.id.btnRetry);
		this.btnRetry.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.connection_problem, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		if (v == this.btnRetry) {
			this.setResult(201);
			this.finish();
		}
		
	}
	
	@Override
	public void onBackPressed() {
		this.setResult(9999);
		this.finish();
	}

}
